package com.hp.service.impl;

import java.util.List;

import com.hp.dao.UserDao;
import com.hp.entity.User;
import com.hp.service.UserService;

public class UserServiceImpl implements UserService {
	private UserDao userdao;
	
	
	public void setUserdao(UserDao userdao) {
		this.userdao = userdao;
	}

	@Override
	public Boolean Login(String username, String password) {
		List list = userdao.findUser(username, password);
		if(list.size()>0) {
			return true;
		}else {
			return false;
		}
	}

	@Override
	public void Regies(User user) {
		userdao.insertUser(user);
	}

}
